package org.cst8277.ums.nas.listeners;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.google.common.collect.Lists;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.cst8277.ums.nas.entity.IpPlan;

import java.util.List;


@Data
@Slf4j
public class IpPlanListener extends AnalysisEventListener<IpPlan> {
    private List<IpPlan> ipPlanList = Lists.newArrayList();

    @Override
    public void invoke(IpPlan ipPlan, AnalysisContext analysisContext) {
        log.info("ipPlan:{}", ipPlan);
        this.ipPlanList.add(ipPlan);
    }


    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {
        log.info("[地址规划]数据读取完成");
    }
}
